{config_load file="main.txt" section=mainPage}
{config_load file="inserat.txt"}

{*load the content tree*}
{load_structure var=tree}

<!-- start sidebar -->
<div id="sidebarL">
	<h2>{#searchs#}</h2>
	<div align="center">
		<form id="search" name="search" method="get" action="{$INA.root}">
			<input type="text" maxlength="64" name="search" id="searchString"  />
			<input type="submit" value="{#go#}" />
		</form>
	</div>

	<hr class="hide" />
	
	{* get some recent listing *}
    {load_listings}
    
	<h2>{#recent#}</h2>
	<ol>
		{foreach from=$listings item=inserat}
		<li>
			<h3><a href="/{$inserat.url}">{$inserat.title|truncate:25}</a></h3>
			<p>{$inserat.content|truncate:128|strip_tags}</p>
			<p><strong>{#price#}:</strong>
			{if $inserat.price_type == 0}
				{$inserat.price} {#curr#}
			{elseif $inserat.price_type == 1}
				{#bestOffer#}
			{elseif $inserat.price_type == 2}
				{#contact#}
			{elseif $inserat.price_type == 3}
				{#exchange#}
			{elseif $inserat.price_type == 4}
				{#free#}
			{/if} <strong>{#type#}:</strong> {if $inserat.type == 1}{#selling#}{else}{#seeking#}{/if}
			</p>
		</li>
		{/foreach}
	</ol>
	
	<div class="helpBox">
		<p>{#shelp#}</p>
	</div>
</div>
<!-- end sidebar -->


<div id="contentR" style="vertical-align: top;">
	<h2>{$data.title}</h2>

	{$data.content}

	<hr class="hide" />

	
	<table id="categories" align="center">
		<tr><td>
			<div class="someCat">
				<dl>
				{foreach from=$searchItems item=tree}
					<dd><a href="/{$tree.url}">{$tree.title}</a></dd>
				{/foreach}
				</dl>
			</div>
		</td></tr>
	</table>
</div>
<!-- end content -->